/**
 * 
 */
package br.com.ctm.guiamedico.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

import br.com.framework.persistencia.model.BaseEntity;

/**
 * @author Cleber
 * 
 */
@Entity
@Table(name = "Uf")
@XmlRootElement
public class Uf extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	private String nome;
	private String sigla;

	/**
	 * 
	 */
	public Uf() {
	}
	
	@Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator="SEQ_UF")
	@SequenceGenerator(name="SEQ_UF", sequenceName="SEQ_UF", allocationSize=1, initialValue=0)
	@Column(name = "ID_UF")
	public Long getId() {
		return super.getId();
	}

	/**
	 * @return the nome
	 */
	@Column(name = "NOME", length = 255, nullable = false, unique = true)
	@Size(min = 1, max = 255, message = "{geral.campo.tamanhoInvalido}")
	public String getNome() {
		return nome;
	}

	/**
	 * @param nome
	 *            the nome to set
	 */
	public void setNome(String titulo) {
		this.nome = titulo;
	}

	/**
	 * @return the sigla
	 */
	@Column(name = "SIGLA", length = 2, nullable = false, unique = true)
	@Size(min = 2, max = 2, message = "{geral.campo.tamanhoInvalido}")
	public String getSigla() {
		return sigla;
	}

	/**
	 * @param sigla the sigla to set
	 */
	public void setSigla(String sigla) {
		this.sigla = sigla;
	}

	
}
